import getapi from "@/apis/getapi.js";
export let Collec={
    state:{
        text:""
    },
    mutations:{
        uptext(state,payload){
            state.text=payload
        }
    },
    actions:{
        link(context,payload){
            console.log(context);
            getapi(payload.url).then((ok)=>{
                console.log(ok.data.data);
                context.commit("uptext",ok.data.data)
            })
        }
    },
    getters:{
        fangan(state){
            return state.text
        }
    }
}
